﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="edit.aspx.cs" Inherits="Joyintech.Admin.inpiao365.general.task.edit" %>

<%@ Register Src="~/checkRight.ascx" TagName="checkRight" TagPrefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>编辑定时生成任务</title>
    <script language="javascript" type="text/javascript">
        var DG = frameElement.lhgDG;
        function ok() {
            // 这里写你要操作的代码，最后写刷新代码 
            DG.curWin.location.href = DG.curWin.location.href;
        }

        function show(type) {
            if (type == "Month") {
                document.getElementById("spStartDay").style.display = "";
                document.getElementById("spStartWeekday").style.display = "none";
                document.getElementById("spStartHour").style.display = "";
                document.getElementById("spPeriodIntervalMinute").style.display = "none";
            }
            else if (type == "Week") {
                document.getElementById("spStartDay").style.display = "none";
                document.getElementById("spStartWeekday").style.display = "";
                document.getElementById("spStartHour").style.display = "";
                document.getElementById("spPeriodIntervalMinute").style.display = "none";
            }
            else if (type == "Day") {
                document.getElementById("spStartDay").style.display = "none";
                document.getElementById("spStartWeekday").style.display = "none";
                document.getElementById("spStartHour").style.display = "";
                document.getElementById("spPeriodIntervalMinute").style.display = "none";
            }
            else if (type == "Hour") {
                document.getElementById("spStartDay").style.display = "none";
                document.getElementById("spStartWeekday").style.display = "none";
                document.getElementById("spStartHour").style.display = "none";
                document.getElementById("spPeriodIntervalMinute").style.display = "none";
            }
            else if (type == "Period") {
                document.getElementById("spStartDay").style.display = "none";
                document.getElementById("spStartWeekday").style.display = "none";
                document.getElementById("spStartHour").style.display = "none";
                document.getElementById("spPeriodIntervalMinute").style.display = "";
            }
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div class="position">
        <span>编辑定时生成任务</span>
    </div>
    <br />
    <jui:HFPanel ID="HFPanel1" runat="server">
        <table border="0" cellpadding="0" cellspacing="1" width="90%" align="center" class="datatable">
            <tr class="row1" style="display: none;">
                <td class="check">
                    自动编号：
                </td>
                <td colspan="3">
                    <jui:HFTextBox ID="TaskId" runat="server" ChineseName="自动编号" PropertyName="TaskId"
                        NotNUll="True"></jui:HFTextBox>
                </td>
            </tr>
            <tr class="row2">
                <td class="check" width="150">
                    任务名称：
                </td>
                <td width="350">
                    <jui:HFTextBox ID="TaskName" runat="server" ChineseName="任务名称" PropertyName="TaskName"
                        NotNUll="True" FieldLength="50" Width="250"></jui:HFTextBox>*
                </td>
                <td class="check" width="150">
                    任务类型:
                </td>
                <td>
                    <jui:HFDropDownList ID="ddlTaskType" runat="server" ChineseName="任务类型" PropertyName="TaskType" Enabled="false">
                        <asp:ListItem Value="Channel">栏目</asp:ListItem>
                        <asp:ListItem Value="Content">内容</asp:ListItem>
                        <asp:ListItem Value="File">文件</asp:ListItem>
                    </jui:HFDropDownList>
                </td>
            </tr>
            <tr class="row1">
                <td class="check">
                    任务执行频率:
                </td>
                <td>
                    <jui:HFDropDownList ID="ddlFrequencyType" runat="server" ChineseName="任务执行频率" PropertyName="FrequencyType"
                        onchange="show(this.value);">
                        <asp:ListItem Value="Month">每月一次</asp:ListItem>
                        <asp:ListItem Value="Week">每周一次</asp:ListItem>
                        <asp:ListItem Value="Day">每天一次</asp:ListItem>
                        <asp:ListItem Value="Hour">每小时一次</asp:ListItem>
                        <asp:ListItem Value="Period">每周期一次</asp:ListItem>
                    </jui:HFDropDownList>
                </td>
                <td colspan="2">
                    <span id="spStartDay">日期：<jui:HFDropDownList ID="ddlStartDay" runat="server"
                        ChineseName="日期" PropertyName="StartDay">
                        <asp:ListItem Value="1">1</asp:ListItem>
                        <asp:ListItem Value="2">2</asp:ListItem>
                        <asp:ListItem Value="3">3</asp:ListItem>
                        <asp:ListItem Value="4">4</asp:ListItem>
                        <asp:ListItem Value="5">5</asp:ListItem>
                        <asp:ListItem Value="6">6</asp:ListItem>
                        <asp:ListItem Value="7">7</asp:ListItem>
                        <asp:ListItem Value="8">8</asp:ListItem>
                        <asp:ListItem Value="9">9</asp:ListItem>
                        <asp:ListItem Value="10">10</asp:ListItem>
                        <asp:ListItem Value="11">11</asp:ListItem>
                        <asp:ListItem Value="12">12</asp:ListItem>
                        <asp:ListItem Value="13">13</asp:ListItem>
                        <asp:ListItem Value="14">14</asp:ListItem>
                        <asp:ListItem Value="15">15</asp:ListItem>
                        <asp:ListItem Value="16">16</asp:ListItem>
                        <asp:ListItem Value="17">17</asp:ListItem>
                        <asp:ListItem Value="18">18</asp:ListItem>
                        <asp:ListItem Value="19">19</asp:ListItem>
                        <asp:ListItem Value="20">10</asp:ListItem>
                        <asp:ListItem Value="21">11</asp:ListItem>
                        <asp:ListItem Value="22">22</asp:ListItem>
                        <asp:ListItem Value="23">23</asp:ListItem>
                        <asp:ListItem Value="24">24</asp:ListItem>
                        <asp:ListItem Value="25">25</asp:ListItem>
                        <asp:ListItem Value="26">26</asp:ListItem>
                        <asp:ListItem Value="27">27</asp:ListItem>
                        <asp:ListItem Value="28">28</asp:ListItem>
                        <asp:ListItem Value="29">29</asp:ListItem>
                        <asp:ListItem Value="30">30</asp:ListItem>
                        <asp:ListItem Value="31">31</asp:ListItem>
                    </jui:HFDropDownList>
                    </span><span id="spStartWeekday">星期：
                        <jui:HFDropDownList ID="ddlStartWeekday" runat="server" ChineseName="星期" PropertyName="StartWeekday">
                            <asp:ListItem Value="1">星期一</asp:ListItem>
                            <asp:ListItem Value="2">星期二</asp:ListItem>
                            <asp:ListItem Value="3">星期三</asp:ListItem>
                            <asp:ListItem Value="4">星期四</asp:ListItem>
                            <asp:ListItem Value="5">星期五</asp:ListItem>
                            <asp:ListItem Value="6">星期六</asp:ListItem>
                            <asp:ListItem Value="7">星期日</asp:ListItem>
                        </jui:HFDropDownList>
                    </span><span id="spStartHour">小时：
                        <jui:HFDropDownList ID="ddlStartHour" runat="server" ChineseName="小时" PropertyName="StartHour">
                            <asp:ListItem Value="1">1</asp:ListItem>
                            <asp:ListItem Value="2">2</asp:ListItem>
                            <asp:ListItem Value="3">3</asp:ListItem>
                            <asp:ListItem Value="4">4</asp:ListItem>
                            <asp:ListItem Value="5">5</asp:ListItem>
                            <asp:ListItem Value="6">6</asp:ListItem>
                            <asp:ListItem Value="7">7</asp:ListItem>
                            <asp:ListItem Value="8">8</asp:ListItem>
                            <asp:ListItem Value="9">9</asp:ListItem>
                            <asp:ListItem Value="10">10</asp:ListItem>
                            <asp:ListItem Value="11">11</asp:ListItem>
                            <asp:ListItem Value="12">12</asp:ListItem>
                            <asp:ListItem Value="13">13</asp:ListItem>
                            <asp:ListItem Value="14">14</asp:ListItem>
                            <asp:ListItem Value="15">15</asp:ListItem>
                            <asp:ListItem Value="16">16</asp:ListItem>
                            <asp:ListItem Value="17">17</asp:ListItem>
                            <asp:ListItem Value="18">18</asp:ListItem>
                            <asp:ListItem Value="19">19</asp:ListItem>
                            <asp:ListItem Value="20">10</asp:ListItem>
                            <asp:ListItem Value="21">11</asp:ListItem>
                            <asp:ListItem Value="22">22</asp:ListItem>
                            <asp:ListItem Value="23">23</asp:ListItem>
                        </jui:HFDropDownList>
                    </span><span id="spPeriodIntervalMinute">每周期间隔：<jui:HFTextBox ID="PeriodIntervalMinute"
                        runat="server" ChineseName="每周期间隔" PropertyName="PeriodIntervalMinute" FieldType="整型" Width="40">0</jui:HFTextBox>
                        <asp:DropDownList ID="ddlPeriodType" runat="server">
	                    <asp:ListItem value="1">分钟</asp:ListItem>
                        <asp:ListItem Value="5040">周</asp:ListItem>
	                    <asp:ListItem Value="720">天</asp:ListItem>
	                    <asp:ListItem Value="12">小时</asp:ListItem>
                        </asp:DropDownList>
                        </span>
                    
<script language="javascript">
    show("Month");
</script>
                </td>
            </tr>
            <tr class="row2">
                <td class="check">
                    生成项目：
                </td>
                <td colspan="3">
                    <select id="list" runat="server" multiple="true" style="height: 240px; width: 250px;">
                    </select>
                </td>
            </tr>
            <tr class="row2" style="display: none;">
                <td class="check">
                    启用状态：
                </td>
                <td>
                    <jui:HFDropDownList ID="ddlIsEnabled" runat="server" ChineseName="启用状态" PropertyName="IsEnabled">
                        <asp:ListItem Value="True">启用</asp:ListItem>
                        <asp:ListItem Value="False">禁用</asp:ListItem>
                    </jui:HFDropDownList>
                </td>
                <td class="check">
                    添加时间：
                </td>
                <td>
                    <jui:HFDatePicker ID="AddDate" runat="server" ChineseName="添加时间" PropertyName="AddDate"></jui:HFDatePicker>
                </td>
            </tr>
            <tr class="row2" style="display: none;">
                <td class="check">
                    上次执行时间：
                </td>
                <td colspan="3">
                    <jui:HFDatePicker ID="LastExecuteDate" runat="server" ChineseName="上次执行时间" PropertyName="LastExecuteDate"></jui:HFDatePicker>
                </td>
            </tr>
            <tr class="row1">
                <td class="check">
                    描述：
                </td>
                <td colspan="3">
                    <jui:HFTextBox ID="Remark" runat="server" ChineseName="描述" PropertyName="Remark" TextMode="MultiLine" style="height: 40px; width: 250px;"></jui:HFTextBox>
                </td>
            </tr>
            <tr class="row2">
                <td colspan="4" class="fontC" align="center">
                    <jui:HFButton ID="btnSave" runat="server" CssClass="BigButton" Text="确定" OnClick="btnSave_Click" />
                    &nbsp;&nbsp;
                    <jui:HFButton ID="btnSaveAs" runat="server" CssClass="BigButton" Text="保存副本" OnClick="btnSaveAs_Click" />
                    &nbsp;&nbsp;
                    <input type="button" value="返回" class="BigButton" onclick="DG.cancel();" />
                </td>
            </tr>
        </table>
    </jui:HFPanel>
    <uc1:checkRight ID="checkRight1" runat="server" />
    </form>
</body>
</html>